// OrderItem.java
package com.onlineshop.entity;

import java.math.BigDecimal;

public class OrderItem {
    private Integer itemId;
    private Integer orderId;
    private Integer productId;
    private String productName; // 非数据库字段，用于显示
    private Integer quantity;
    private BigDecimal price;

    // 构造方法、getter和setter省略
    // 请自行补充

    public OrderItem() {
    }

    public OrderItem(Integer itemId, Integer orderId, Integer productId, String productName, Integer quantity, BigDecimal price) {
        this.itemId = itemId;
        this.orderId = orderId;
        this.productId = productId;
        this.productName = productName;
        this.quantity = quantity;
        this.price = price;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }
}